export default {
	empty: (trigger, data) => ({
		required: true,
		message: `${data}不能为空`,
		trigger,
	}),
	phoneno: {
		pattern: /^1[34578]\d{9}$/,
		message: "目前只支持中国大陆的手机号码",
	},
	email: {
		pattern: /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
		message: "邮箱格式输入错误",
	},
	identity: { pattern: /^[0-9]{17}[0-9X]$/, message: "身份证格式不正确" },
	time: {
		pattern: /^\+?[1-9][0-9]*$/,
		message: "请输入正确时间，时间不能带小数点",
	},
	money: {
		pattern: /^([1-9]\d*)(\.\d{1,100})?$|^0\.\d{1,100}?$/,
		message: "请输入正确数字，且大于零",
	},
	Hanzi: { pattern: /^[\u4e00-\u9fa5]+$/, message: "请输入汉字" },
	noHanzi: { pattern: /^[A-Za-z0-9]+$/, message: "请输入英文或数字" },
	integer: { pattern: /^([0]|[1-9][0-9]*)$/, message: "请输入正整数" },
};
